<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../tpl/head.jsp"%>
<link rel="stylesheet" href="statics/css/secondarytitle.css">
<link rel="stylesheet" href="statics/css/other/tpl/newupgeneral.css">
<div class="layui-fluid">
    <div class="layui-card">
        <div class="header">
            <img class="img " src="statics/images/titheader.svg">
            <span>添加，修改图纸</span>
        </div>
        <div class="layui-card-body">
            <form class="layui-form" action="" lay-filter="editor-form" id="editor-form">
                <div class="layui-form-item zdy-item-css">
                    <div class="layui-inline">
                        <label class="layui-form-label">图纸编号</label>
                        <div class="layui-input-inline">
                            <input type="text" name="number" id="number" autocomplete="off" class="layui-input" lay-verify="required" placeholder="可自动生成">
                            <input type="hidden" name="boxStatus" id="boxStatus">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">创建日期</label>
                        <div class="layui-input-inline">
                            <input type="text" name="createTime" id="createTime" lay-verify="required|date" autocomplete="off" class="layui-input" placeholder="年 - 月 - 日">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item zdy-item-css">
                    <div class="layui-inline">
                        <label class="layui-form-label">操作员</label>
                        <div class="layui-input-inline">
                            <input type="text" name="operatorName" id="operatorName" autocomplete="off" class="layui-input" disabled>
                            <input name="operator" id="operator" hidden>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea name="remark" id="remark" placeholder="请输入内容" class="layui-textarea"></textarea>
                    </div>
                </div>
                <div class="layui-row">
                    <div class="layui-col-xs12">
                        <div class="layui-tab layui-tab-card" lay-filter="tabElement">
                            <ul class="layui-tab-title">
                                <li class="layui-this" lay-id="1">明细信息</li>
                                <li lay-id="2">图纸附件</li>
                                <li lay-id="3">日志</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div  class="layui-tab-item  layui-show">
                                    <table class="layui-table" id="detailInfo" lay-filter="detailInfoTable"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-table" id="attachment" lay-filter="attachmenttable"></table>
                                </div>
                                <div class="layui-tab-item"><table class="layui-table" id="otherwarehouselog" lay-filter="logtable"></table></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="padding text-right">
                    <button type="button" class="layui-btn" lay-submit="" lay-filter="form-element">立即提交</button>
                    <button type="button" class="layui-btn" lay-submit="" lay-filter="form-element3">关闭</button>
                </div>
                
                <div class="layui-tab layui-tab-card" id="hidden">
                    <form class="layui-form" action="" lay-filter="editor-form2" id="editor-form2">
                        <ul class="layui-tab-title">
                            <li class="layui-this">上传附件</li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">
                                <table class="layui-table" id="contentUpload" lay-filter="contentUploadTable"></table>
                            </div>
                        </div>
                        <div class="padding text-right">
                            <button type="button" class="layui-btn" lay-submit="" lay-filter="form-element2">保存附件</button>
                            <button type="button" class="layui-btn" lay-submit="" lay-filter="form-element3">关闭</button>
                        </div>
                    </form>
                </div>
            </form>
        </div>
    </div>
</div>

<div class="layui-upload" id="attachmentupload" style="display: none;padding: 10px">
    <a type="button" class="layui-btn layui-btn-normal" id="uploadfile">选择文件</a>
    <div class="layui-upload-list">
        <table class="layui-table">
            <thead>
            <tr><th>文件名</th>
                <th>大小</th>
                <th>状态</th>
                <th>操作</th>
            </tr></thead>
            <tbody id="uploadlist"></tbody>
        </table>
    </div>
    <a type="button" class="layui-btn" id="testListAction">开始上传</a>
</div>

<script type="text/html" id="colourScript">
    <select id="colour_{{d.tempId}}" class="colourSelect" lay-filter="colourSelect_filter">
        <option value="{{d.colour?d.colour:''}}">{{d.colour?d.colour:''}}</option>
        <%--        <option value=""></option>--%>
    </select>
</script>
<script type="text/html" id="unitScript">
    <select id="unit_{{d.tempId}}" class="unitSelect" lay-filter="unitSelect_filter">
        <option value="{{d.unit?d.unit:''}}">{{d.unit?d.unit:''}}</option>
        <%--        <option value=""></option>--%>
    </select>
</script>

<script type="text/html" id="detailInfoToolbar">
    <a class="layui-btn" data-type="getCheckData" lay-event="importproducts">新增</a>
    <a class="layui-btn" data-type="getCheckData" lay-event="del">删除</a>
</script>
<script type="text/html" id="detailInfoEditor">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="attachmenttoolbar">
    <a class="layui-btn" data-type="getCheckData" lay-event="uploadfile">上传</a>
</script>
<script type="text/html" id="attachmenteditor">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="download">下载</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="supplierSelect">
    <select name="supplierSelect" class="supplierClass" id="supplier_{{d.tempId}}" lay-filter="supplierSelect_filter" lay-search>
        <option value=" "> </option>
    </select>
</script>

<%@ include file="../../tpl/foot.jsp"%>
<script src="statics/js/other/tpl/newupdrawings.js"></script>